#include "stdlib.h"
#include "string.h"
#include "stdio.h"


// it's not safe operation. because this operation(char buf[100]) is to apply for room on the stack.

char *get_char(void)  //warning: address of stack memory associated with local variable 'buf' returned [-Wreturn-stack-address]
{
	char buf[100] ;	// 栈区
	memset(buf,0,sizeof(buf));  // 	char buf[100] = {0};
	strcpy(buf,"abc");
	return buf;
}

int main(void)
{
	char *p = NULL;
	p = get_char();
	printf("output: %s\n", p);
	return 0;
}

